import tkinter as tk 

window = tk.Tk()
window.title('YoLo')
window.geometry('300x300')
window.iconbitmap('qianduan\logo.ico')
def callback():
  print("执行回调函数","YOLO欢迎你")

button = tk.Button(window,text="执行",command=callback)
button.pack()
window.mainloop()